package api

import (
	"github.com/gin-gonic/gin"
	"shopping-order/api/handler"
)

func LoadRouter(r *gin.Engine) {

	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			user.POST("/register", handler.RegisterUser)
			user.POST("/login", handler.LoginUser)
		}
		order := api.Group("/order")
		{
			order.POST("/add", handler.AddOrder)
			order.POST("/list", handler.ListOrder)
			order.POST("/listByUser", handler.ListByUserOrder)

		}
	}

}
